<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
/--------------------------------------------------------------------------
/ STOCKIN
/--------------------------------------------------------------------------
/ menampilkan data stock item yang ada di outlet
/ @author alfin akhret <alfin.akhret@gmai.com>
/
/ file_dependencies:
/   - m_stockin.php (model)
/   - view_stockin.php (view)  
*/

class Stockin extends CI_Controller
{
  
  public function __construct()
  {
    parent::__construct();
    $this->load->model('m_stockin');
    $this->load->model('mmaster');
  }

  function index()
  {
    $data['template'] = "shell/smooth";
    $data['main_view'] = 'view_stockin';
    //get outlet data
    $data['stock'] = $this->m_stockin->_get_stock($this->session->userdata('username'), 14);
    $data['table'] = 'stock_in';
    // $this->load->view('view_stockin', $data);
    $this->load->view($data['template'], $data);
  }

  function get_stock_detail($id_partner, $stock_scan_id)
  {
    $data['template'] = "shell/smooth";
    $data['main_view'] = 'view_stockin';
    $data['table'] = 'stock_in_detail';
    $data['stock_detail'] = $this->m_stockin->_get_stock_detail($this->session->userdata('username'), $id_partner, $stock_scan_id, 14);
    $this->load->view($data['template'], $data);
  }

}